<?php

namespace App\Models;

use App\Libs\DataFormat;
use Illuminate\Database\Eloquent\Model;


class Order extends Model
{
    use DataFormat;
    protected  $table='order';

    protected $primaryKey= 'id';

    protected $fillable=['order_num','team_id','org_id','goods_id','user_id','status','num','points','state'];

    public function goods_id()
    {
        return $this->hasOne('App\Models\Goods', 'id', 'goods_id');
    }

    public function user_id()
    {
        return $this->hasOne('App\Models\user', 'id', 'user_id');
    }
}